<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>demo2-5</title>
    <script src="vue.js"></script>
</head>
<body>
    <div id="app">
        <p>文本插值：{{name}}</p>
        <p>数值表达式:{{price + 3 * 8}}</p>
        <p>含有内置函数的计算表达式:{{Math.pow(3,4)+50}}</p>
        <p>含有自定义函数的表达式:{{add()}}</p>
        <p>条件表达式:{{3>5 ? 1 : 0}}</p>
    </div>
</body>
<script>
    const appCom = {
        data(){
            return{
                name:'zs',
                price:20
            }
        },
        methods:{
            add(){
                return this.price + 1;
            }
        }
    };
    Vue.createApp(appCom).mount("#app");
</script>
</html>